#ifndef  OBJECT_H
#define  OBJECT_H


#define     NOQUOTES    0 //不带双引号
#define     QUOTES      1 //带双引号


typedef struct _object
{
    char    FS;//分隔符
    int     NF;//分割后的字段总数
    char *  src; //源字符串
    char **field_list; //字段列表
}object_t;


object_t *object_string_split (char *string, char FS, char type); //以FS为分隔符分割字符串
char * object_string_get_field_string(object_t *object, int index); //获得第N个字段
int object_string_get_field_total (object_t *object);//获得分割字段的总数
void object_free(object_t *object);//释放对象的内存空间

#endif  /*OBJECT_H*/
